﻿<Application 
    x:Class="Leuphana.GuidedTour.App.App"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"       
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:local="clr-namespace:Leuphana.GuidedTour.App"
    xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit">

    <!--Applicationresources-->
    <Application.Resources>
        
        <!--ValueConverter-->
        <local:UpperCaseConverter x:Key="UpperCaseConverter" />
        <local:VisibilityConverter x:Key="VisibilityConverter" />
        <local:VisibilityConverter x:Key="NegativeVisibilityConverter" IsNegative="True" />
        
        <!--Chromeless Button Style-->
    	<Style x:Key="ChromelessButtonStyle" TargetType="Button">
    		<Setter Property="Background" Value="Transparent"/>
    		<Setter Property="Padding" Value="0"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="Button">
    					<Grid Background="Transparent">
    						<VisualStateManager.VisualStateGroups>
    							<VisualStateGroup x:Name="CommonStates">
    								<VisualState x:Name="Normal"/>
    								<VisualState x:Name="MouseOver"/>
    								<VisualState x:Name="Pressed"/>
    								<VisualState x:Name="Disabled">
    									<Storyboard>
    										<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentContainer">
    											<DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource PhoneDisabledBrush}"/>
    										</ObjectAnimationUsingKeyFrames>
    									</Storyboard>
    								</VisualState>
    							</VisualStateGroup>
    						</VisualStateManager.VisualStateGroups>
                            
    						<ContentControl x:Name="ContentContainer" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" Padding="{TemplateBinding Padding}" VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" toolkit:TiltEffect.IsTiltEnabled="True"/>
    					</Grid>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    </Application.Resources>

    <Application.ApplicationLifetimeObjects>
        <!--Required object. Handles lifetime events-->
        <shell:PhoneApplicationService 
            Launching="Application_Launching" Closing="Application_Closing" 
            Activated="Application_Activated" Deactivated="Application_Deactivated"/>
    </Application.ApplicationLifetimeObjects>

</Application>